﻿CREATE TABLE [account].[BalanceSheetMHFG] (
    [AccountUId]                  INT                 NOT NULL,
    [AccountId]                   SMALLINT            NOT NULL,
    [AccountCode]                 VARCHAR (8)         NOT NULL,
    [AccountName]                 VARCHAR (100)       NOT NULL,
    [AccountType]                 CHAR (1)            NOT NULL,
    [AccountBalanceType]          CHAR (1)            NULL,
    [AccountCateryCode]           CHAR (3)            NOT NULL,
    [AccountCateryName]           VARCHAR (50)        NOT NULL,
    [AccountMappingPath]          [sys].[hierarchyid] NOT NULL,
    [AccountMappingLevel]         BIGINT              NOT NULL,
    [AccountMappingStartDate]     DATE                NOT NULL,
    [AccountMappingEndDate]       DATE                NOT NULL,
    [AccountOrderBy]              INT                 NOT NULL,
    [IsLatest]                    BIT                 NOT NULL,
    [IsActive]                    BIT                 NOT NULL,
    [IsInternal]                  BIT                 NOT NULL,
    [BalanceSheetTypeMHFGUId]     INT                 NOT NULL,
    [BalanceSheetTypeMHFGId]      SMALLINT            NOT NULL,
    [BalanceSheetTypeMHFGCode]    VARCHAR (8)         NULL,
    [BalanceSheetTypeMHFGName]    VARCHAR (100)       NULL,
    [BalanceSheetTypeMHFrderBy]   INT                 NOT NULL,
    [BalanceSheetDetailMHFGUId]   INT                 NULL,
    [BalanceSheetDetailMHFGId]    SMALLINT            NULL,
    [BalanceSheetDetailMHFGCode]  VARCHAR (8)         NULL,
    [BalanceSheetDetailMHFGName]  VARCHAR (100)       NULL,
    [BalanceSheetDetailMHFrderBy] INT                 NULL,
    [SubAccountUId]               INT                 NULL,
    [SubAccountId]                SMALLINT            NULL,
    [SubAccountCode]              VARCHAR (8)         NULL,
    [SubAccountName]              VARCHAR (100)       NULL,
    [SubAccountOrderBy]           INT                 NULL,
    PRIMARY KEY CLUSTERED ([AccountUId] ASC) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF)
);

